3.755 \(\int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\cot (c+d x)}} \, dx\)

Optimal. Leaf size=144 \[ -\frac{2 (-1)^{3/4} \sqrt{a} \sqrt{\tan (c+d x)} \sqrt{\cot (c+d x)} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d}-\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)} \sqrt{\cot (c+d x)} \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d} \]

[Out]

(-2*(-1)^(3/4)*Sqrt[a]*ArcTan[((-1)^(3/4)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]]*Sqrt[Cot[c +
 d*x]]*Sqrt[Tan[c + d*x]])/d - ((1 + I)*Sqrt[a]*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[
c + d*x]]]*Sqrt[Cot[c + d*x]]*Sqrt[Tan[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.326973, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {4241, 3563, 3544, 205, 3599, 63, 217, 203} \[ -\frac{2 (-1)^{3/4} \sqrt{a} \sqrt{\tan (c+d x)} \sqrt{\cot (c+d x)} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d}-\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)} \sqrt{\cot (c+d x)} \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[Cot[c + d*x]],x]

[Out]

(-2*(-1)^(3/4)*Sqrt[a]*ArcTan[((-1)^(3/4)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]]*Sqrt[Cot[c +
 d*x]]*Sqrt[Tan[c + d*x]])/d - ((1 + I)*Sqrt[a]*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[
c + d*x]]]*Sqrt[Cot[c + d*x]]*Sqrt[Tan[c + d*x]])/d

Rule 4241

Int[(cot[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Dist[(c*Cot[a + b*x])^m*(c*Tan[a + b*x])^m, Int[A
ctivateTrig[u]/(c*Tan[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[m] && KnownTangentIntegrandQ
[u, x]

Rule 3563

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(a*c - b*d)/a, Int[Sqrt[a + b*Tan[e + f*x]]/Sqrt[c + d*Tan[e + f*x]], x], x] + Dist[d/a, Int[(Sqrt[a + b*Tan[e
 + f*x]]*(b + a*Tan[e + f*x]))/Sqrt[c + d*Tan[e + f*x]], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a
*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 3544

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(-2*a*b)/f, Subst[Int[1/(a*c - b*d - 2*a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3599

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(b*B)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x
]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && EqQ[A*b + a*B,
 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\cot (c+d x)}} \, dx &=\left (\sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \int \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)} \, dx\\ &=-\left (\left (i \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\tan (c+d x)}} \, dx\right )+\frac{\left (\sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \int \frac{\sqrt{a+i a \tan (c+d x)} (i a+a \tan (c+d x))}{\sqrt{\tan (c+d x)}} \, dx}{a}\\ &=\frac{\left (i a \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{x} \sqrt{a+i a x}} \, dx,x,\tan (c+d x)\right )}{d}-\frac{\left (2 a^2 \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{1}{-i a-2 a^2 x^2} \, dx,x,\frac{\sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac{(1+i) \sqrt{a} \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right ) \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}}{d}+\frac{\left (2 i a \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+i a x^2}} \, dx,x,\sqrt{\tan (c+d x)}\right )}{d}\\ &=-\frac{(1+i) \sqrt{a} \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right ) \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}}{d}+\frac{\left (2 i a \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{1}{1-i a x^2} \, dx,x,\frac{\sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac{2 (-1)^{3/4} \sqrt{a} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right ) \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}}{d}-\frac{(1+i) \sqrt{a} \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right ) \sqrt{\cot (c+d x)} \sqrt{\tan (c+d x)}}{d}\\ \end{align*}

Mathematica [F]  time = 41.525, size = 0, normalized size = 0. \[ \int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\cot (c+d x)}} \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[Cot[c + d*x]],x]

[Out]

Integrate[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[Cot[c + d*x]], x]

________________________________________________________________________________________

Maple [B]  time = 0.409, size = 584, normalized size = 4.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))^(1/2)/cot(d*x+c)^(1/2),x)

[Out]

1/2/d*2^(1/2)*(a*(I*sin(d*x+c)+cos(d*x+c))/cos(d*x+c))^(1/2)*cos(d*x+c)*(cos(d*x+c)-1)*(I*ln(((cos(d*x+c)-1)/s
in(d*x+c))^(1/2)+1)*2^(1/2)-2*I*arctan(((cos(d*x+c)-1)/sin(d*x+c))^(1/2))*2^(1/2)-I*ln(((cos(d*x+c)-1)/sin(d*x
+c))^(1/2)-1)*2^(1/2)+2*I*arctan(((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*2^(1/2)+1)+2*I*arctan(((cos(d*x+c)-1)/sin(d
*x+c))^(1/2)*2^(1/2)-1)+I*ln(-(((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*2^(1/2)*sin(d*x+c)-cos(d*x+c)-sin(d*x+c)+1)/(
((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*2^(1/2)*sin(d*x+c)+cos(d*x+c)+sin(d*x+c)-1))+ln(((cos(d*x+c)-1)/sin(d*x+c))^
(1/2)+1)*2^(1/2)+2*arctan(((cos(d*x+c)-1)/sin(d*x+c))^(1/2))*2^(1/2)-ln(((cos(d*x+c)-1)/sin(d*x+c))^(1/2)-1)*2
^(1/2)-2*arctan(((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*2^(1/2)+1)-2*arctan(((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*2^(1/2
)-1)-ln(-(((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*2^(1/2)*sin(d*x+c)+cos(d*x+c)+sin(d*x+c)-1)/(((cos(d*x+c)-1)/sin(d
*x+c))^(1/2)*2^(1/2)*sin(d*x+c)-cos(d*x+c)-sin(d*x+c)+1)))/sin(d*x+c)/(cos(d*x+c)/sin(d*x+c))^(1/2)/(I*sin(d*x
+c)+cos(d*x+c)-1)/((cos(d*x+c)-1)/sin(d*x+c))^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{i \, a \tan \left (d x + c\right ) + a}}{\sqrt{\cot \left (d x + c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(1/2)/cot(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(I*a*tan(d*x + c) + a)/sqrt(cot(d*x + c)), x)

________________________________________________________________________________________

Fricas [B]  time = 1.47929, size = 1262, normalized size = 8.76 \begin{align*} \frac{1}{2} \, \sqrt{\frac{4 i \, a}{d^{2}}} \log \left ({\left (\sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )} e^{\left (i \, d x + i \, c\right )} + d \sqrt{\frac{4 i \, a}{d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) - \frac{1}{2} \, \sqrt{\frac{4 i \, a}{d^{2}}} \log \left ({\left (\sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )} e^{\left (i \, d x + i \, c\right )} - d \sqrt{\frac{4 i \, a}{d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) - \frac{1}{2} \, \sqrt{\frac{2 i \, a}{d^{2}}} \log \left ({\left (\sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )} e^{\left (i \, d x + i \, c\right )} + d \sqrt{\frac{2 i \, a}{d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) + \frac{1}{2} \, \sqrt{\frac{2 i \, a}{d^{2}}} \log \left ({\left (\sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )} e^{\left (i \, d x + i \, c\right )} - d \sqrt{\frac{2 i \, a}{d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(1/2)/cot(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(4*I*a/d^2)*log((sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*
x + 2*I*c) - 1))*(e^(2*I*d*x + 2*I*c) - 1)*e^(I*d*x + I*c) + d*sqrt(4*I*a/d^2)*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*
x - 2*I*c)) - 1/2*sqrt(4*I*a/d^2)*log((sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((I*e^(2*I*d*x + 2*I*c) +
 I)/(e^(2*I*d*x + 2*I*c) - 1))*(e^(2*I*d*x + 2*I*c) - 1)*e^(I*d*x + I*c) - d*sqrt(4*I*a/d^2)*e^(2*I*d*x + 2*I*
c))*e^(-2*I*d*x - 2*I*c)) - 1/2*sqrt(2*I*a/d^2)*log((sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((I*e^(2*I*
d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1))*(e^(2*I*d*x + 2*I*c) - 1)*e^(I*d*x + I*c) + d*sqrt(2*I*a/d^2)*e^(
2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)) + 1/2*sqrt(2*I*a/d^2)*log((sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*s
qrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1))*(e^(2*I*d*x + 2*I*c) - 1)*e^(I*d*x + I*c) - d*sqrt(
2*I*a/d^2)*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \left (i \tan{\left (c + d x \right )} + 1\right )}}{\sqrt{\cot{\left (c + d x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))**(1/2)/cot(d*x+c)**(1/2),x)

[Out]

Integral(sqrt(a*(I*tan(c + d*x) + 1))/sqrt(cot(c + d*x)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{i \, a \tan \left (d x + c\right ) + a}}{\sqrt{\cot \left (d x + c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(1/2)/cot(d*x+c)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(I*a*tan(d*x + c) + a)/sqrt(cot(d*x + c)), x)